<?php
require_once '../sub/init.php';
//define('ZEAI2',dirname(__FILE__).DIRECTORY_SEPARATOR);
require_once 'chkUadm.php';
/*if(is_mobile()){
	if($session_kind=='crm'){
		header("Location: m_crm.php");
	}else{
		header("Location: m_adm.php");
	}
}
*/
require_once ZEAI.'cache/config_reg.php';
require_once ZEAI.'cache/config_shop.php';
$TG_set = json_decode($_REG['TG_set'],true);
$path_s_str=(!empty($session_path_s))?'<img src="'.$_ZEAI['up2'].'/'.$session_path_s.'">':'<img src="'.HOST.'/res/photo_m.png">';
if ($session_kind=='crm'){$wwwzeaicn='crm';}
switch ($wwwzeaicn) {
	case 'crm':
		$index_url='crm_welcome.php';
		$index_url_left='crm_left.php';
	break;
	case 'tg':
		$index_url='TG_welcome.php';
		$index_url_left='TG_left.php';
	break;
	case 'shop':
		$index_url='shop_welcome.php';
		$index_url_left='shop_left.php';
	break;
	default:
		$index_url='welcome.php';
		$index_url_left='left.php';
	break;
}
?>
<!doctype html><html><head><meta charset="utf-8">
<title><?php echo $_ADM['admSiteName']; ?> ● 后台管理</title>
<link href="./css/index.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="./css/main.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<script src="<?php echo HOST;?>/res/www_zeai_cn.js?<?php echo $_ZEAI['cache_str'];?>"></script>
</head>
<body scroll="no"style="overflow:hidden">
<?php localhost_auth();?>
<main>
	<div id="leftMain"><?php require_once $index_url_left;?></div>
    <div id="rightMain">
        <div class="top">
            <ul>
                <?php if ($session_kind!='crm'){?><a href="./"<?php echo (empty($wwwzeaicn))?' class="ed"':'';?>><i class="ico">&#xe65d;</i>主后台</a><?php }?>
                <a href="./?wwwzeaicn=crm"<?php echo ($wwwzeaicn=='crm')?' class="ed"':'';?>><i class="ico">&#xe613;</i>红娘CRM</a>
                <?php if ($session_kind!='crm'){?><a href="./?wwwzeaicn=tg"<?php echo ($wwwzeaicn=='tg')?' class="ed"':'';?>><i class="ico">&#xe61d;</i>推广分销</a>
                <a href="./?wwwzeaicn=shop"<?php echo ($wwwzeaicn=='shop')?' class="ed"':'';?>><i class="ico">&#xe71a;</i>婚恋商城</a><?php }?>
            </ul>
            <div class="righttop">
                <div class="wwwindex transition ico" title="前台首页" onClick="zeai.openurl_('<?php echo HOST;?>')">&#xe636;</div>
                <div class="refresh transition ico" title="刷新内容窗口" onClick="right.location.reload(true);">&#xe67d;</div>
                <div class="clearcache transition ico" title="清理缓存" id="clearcache">&#xe6c7;</div>
                <div class="fullscreen transition ico" title="全屏浏览" id="fullscreen">&#xe661;</div>
                <u class="transition">
                    <div class="uname">
                        <?php echo $path_s_str;?>
                        <span><?php echo $session_truename; ?></span>
                    </div>
                    <em>
                        <a><?php echo $session_title;?></a>
                        <a><?php echo $session_uname.'（ID:'.$session_uid.'）';?></a>
                        <a href="modpass.php" target="right">修改密码</a>
                        <a href="exit.php">退出登录</a>
                    </em>
                </u>
            </div>
            <div class="tab">
            	<div class="back ico" id="tab_back" title="最左">&#xe602;</div>
            	<div class="list" id="tablist">
                	<h5 id="tablist_box" class="stepli">
                	<li class="ed" url="<?php echo $index_url;?>" id="tablist_index"><span>首页</span></li>
                    </h5>
                </div>
            	<div class="next ico" id="tab_next" title="最右">&#xe601;</div>
            	<div class="menu ico" id="tab_menu" title="关闭标签">&#xe60b;</div>
            </div>
            <div class="clear"></div>
        </div>
        <iframe id="iframe" class="iframe" name="right" src="<?php echo $index_url;?>" frameborder="false" scrolling="auto" allowtransparency="true"></iframe>
    </div>
    <em class="indent open" title="左侧缩进" id="indent"><i class="ico">&#xe602;</i></em>
</main>
<div id="toptabmenubox">
	<li><i class="ico">&#xe606;</i>关闭其他</li>
	<li><i class="ico">&#xeaca;</i>关闭右侧</li>
	<li><i class="ico">&#xeaca;</i>关闭左侧</li>
	<li><i class="ico">&#xe65b;</i>关闭全部</li>
	<div class="clear"></div>
</div>
<script src="./js/index.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="./js/piczoom.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script>
var uu=<?php echo $session_uid;?>,pp='<?php echo $session_pwd;?>';
clearcache.onclick=function(){zeai.ajax({url:HOST+'/sub/cache'+zeai.extname,data:{submitok:'config_cache',uu:uu,pp:pp}},function(e){var rs=zeai.jsoneval(e);zeai.msg(rs.msg);});}
</script>
</body>
</html>